package net.jiupinshi.dao;

import net.jiupinshi.entity.StoreUserRelation;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

/**
 * @Despription: 需要修改
 * @Author: penghui.guo
 * @Date: 2018/12/9 3:12
 */
public interface StoreUserRelationDao {
    @Select("select store_id as storeIdfrom store_user_relation where user_id = #{userId}")
    StoreUserRelation getStoreUserRelationByUid(Long userId);

    @Insert("insert into store_user_relation(user_id, store_id) values (#{userId}, #{storeId})")
    @Options(useGeneratedKeys = true)
    int insertStoreUserRelation(StoreUserRelation storeUserRelation);


}
